Hello, I am learning about customizing Advance PDF...
# advancedpdf
m
Hello, I am learning about customizing Advance PDF forms and I am having issues generating a QR Code for a few Items. It works fine for most of the Items, but I am getting an error message with Items like this example STR0526-L=4 - 6" See screenshot bellow. I don't know if it is the space, or the double quotes. • This line gives me that error at Packing Slip printing time. barcode codetype="qrcode" value="${item.item}" height="40" width="40"/ • If I add the "*slip*" to truncate the Item Number and print until the first space, it works, bi it chops the Item. barcode codetype="qrcode" value="${item.item?split(" ")[0]}" height="40" width="40"/ I will appreciate any help.
z
I bet on double quotes. when FreeMarker solve ${item} it will be ended by double quote (6") Spliting with " " and then use [0] it will be print only part before first space I will try with "hardcoded" value (put string value=" .... " and try to get correct QR especially with \" (it is escape sequence for double quote)
m
Hi Zoran, Yes, the double quotes were the problem. I was able to fix it with this replace function.
value="${item.item?replace('"','"')}"
Thank you
👍 1